class PairInfoModel {
  String? system;
  PairInfoModelCustom? custom;
  PairInfoModelSystemInfo? systemInfo;
  bool? isChose=false;
  int? index=0;

  PairInfoModel({this.system, this.custom, this.systemInfo,this.isChose, this.index});

  PairInfoModel.fromJson(Map json) {
    system = json['system'];
    custom =
    json['custom'] != null ?  PairInfoModelCustom.fromJson(json['custom']) : null;
    systemInfo = json['system_info'] != null
        ?  PairInfoModelSystemInfo.fromJson(json['system_info'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['system'] = system;
    if (custom != null) {
      data['custom'] = custom!.toJson();
    }
    if (systemInfo != null) {
      data['system_info'] = systemInfo!.toJson();
    }
    return data;
  }
}

class PairInfoModelCustom {
  int? userId;


  PairInfoModelCustom({this.userId});

  PairInfoModelCustom.fromJson(Map<String, dynamic> json) {
    userId = json['user_id'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['user_id'] = userId;
    return data;
  }
}

class PairInfoModelSystemInfo {
  String? name;//设备名字
  String?userName;//用户名字
  PairInfoModelSystemInfo({this.name});

  PairInfoModelSystemInfo.fromJson(Map<String, dynamic> json) {
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data =  Map<String, dynamic>();
    data['name'] = name;
    return data;
  }
}